/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//		File Name		:		MathLib.h
//
//		Author			:		Kevin Jordan
//
//		Purpose			:		To encapsulate some useful math functions
//
//		Dates			:		Written( Feb 9, 2011 ) by Kevin Jordan		LastUpdate( Feb 21, 2011  ) by Kevin Jordan 
//	
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#ifndef MATHLIB_H_
#define MATHLIB_H_
#include <windows.h>
#include <ctime>
#include <cmath>


//////////////////////////////////
//////////////////////////////////
//		class prototypes         //
//////////////////////////////////
//////////////////////////////////

//Tests to see if a number passed in is even or odd
//If the return value is true then the number is even
//else it is odd
bool IsEven(int Num);

//Produces a random number in a range passed in
int RandInt( int RangeLow, int RangeHigh);

float absolute(float value);

const float VIN_PI = 3.141592653589732f;


//Structs
/*=============================================================*/
//
struct VIN_Vector2D
{
	float m_fX;
	float m_fY;


	//cotrs and destructors
	VIN_Vector2D();
	VIN_Vector2D( float fX, float fY );
	~VIN_Vector2D();

	//Operator overlaods
	VIN_Vector2D operator+(const VIN_Vector2D& Vec1);

	VIN_Vector2D operator-(const VIN_Vector2D& Vec1);

	VIN_Vector2D operator*(int Multiplier);

	VIN_Vector2D operator/(float f);

	//Length
	float LengthOfVector(VIN_Vector2D vec);
	//Dot Product
	float DotProduct(VIN_Vector2D v1, VIN_Vector2D v2);
	//Normalize
	VIN_Vector2D NormalizeVector();

	///////////////////////////
	//Accessors and Mutators
	//////////////////////////
	//Accessors
	//////////////////////////
	//GetX returns a float
	float GetX() { return m_fX; }
	//GetY returns a float
	float GetY() { return m_fY; }
	///////////////////////////////
	//Mutators
	////////////////////////////////
	//SetX sets the members value to the one passed in
	void SetX(float fX) { m_fX = fX; }
	//SetY set the members value to the one passed in
	void SetY(float fY) { m_fY = fY; }
};
#endif